From: Amir E. Aharoni Date: Tue, 31 Jan 2012 13:49:36 +0000 (+0000) Subject: Adding tests for plural in Hebrew. X-Git-Tag: 1.31.0-rc.0~24992 X-Git-Url: http://git.cyclocoop.org//%22http:/%22.attribut_html%28%24lesurls%5B%24numero%5D%29.%22/%22?a=commitdiff_plain;h=b8cc074d88b154a64664a816c6a6b74618d8e5c1;p=lhc%2Fweb%2Fwiklou.git Adding tests for plural in Hebrew. --- diff --git a/tests/phpunit/languages/LanguageHeTest.php b/tests/phpunit/languages/LanguageHeTest.php new file mode 100644 index 0000000000..31eec991dc --- /dev/null +++ b/tests/phpunit/languages/LanguageHeTest.php @@ -0,0 +1,33 @@ +lang = Language::factory( 'he' ); + } + function tearDown() { + unset( $this->lang ); + } + + /** @dataProvider providerPlural */ + function testPlural( $result, $value ) { + $forms = array( 'one', 'many', 'two' ); + $this->assertEquals( $result, $this->lang->convertPlural( $value, $forms ) ); + } + + function providerPlural() { + return array ( + array( 'many', 0 ), // Zero + array( 'one', 1 ), // Singular + array( 'two', 2 ), // Dual + array( 'many', 3 ), // Plural + ); + } +}